package com.sunlong.jiangwei.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.persistence.Transient;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author 孙龙
 * @since 2021-02-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
public class JwOrder implements Serializable {


    /**
     * 订单id
     */
    private Long orderId;

    /**
     * 实付金额。单位:分。如:20007，表示:200元7分
     */
    private Long actualPay;

    /**
     * 订单创建时间
     */
    private Date createTime;

    /**
     * 物流名称
     */
    private String shippingName;

    /**
     * 物流单号
     */
    private String shippingCode;

    /**
     * 用户id
     */
    private Long userId;

    /**
     * 买家留言
     */
    private String buyerMessage;

    /**
     * 买家是否已经评价,0未评价，1已评价
     */
    private Boolean buyerRate;

    /**
     * 使用收货地址
     */
    private Long userAddressId;
    @Transient
    private JwUserAddresslist address;

    private Long spuId;

    @Transient
    private JwSpu spu;
    @Transient
    private JwSku sku;

    private Long skuId;

    private Integer buyNum;
    /**
     * 0：未支付，1：已支付代发货，2：已发货，3：已收货，4：退货待处理 5：已退货
     */
    private Integer status;

    public JwOrder(Long userId) {
        this.userId = userId;
    }
}
